package conchmusic.conchmusicclient.util;

import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.View;

import conchmusic.conchmusicclient.pojo.PlayFlag;

/**
 * Created by Administrator on 2017/5/8.
 */

public class InitPlayBar {
    private View view;
    private Context context;
    private PlayFlag playFlag;
    public InitPlayBar(View view, Context context) {
        this.view = view;
        this.context=context;
        playFlag=(PlayFlag)((Activity)context).getApplication();
    }
    public void initPlaybar(){
        if(playFlag.getFlag()!=0){
            view.setVisibility(View.VISIBLE);
            playFlag.setFlag(1);

        }else {
            Log.i("main","main");
        }
    }
    public void itemInitPlaybar() {
        if (playFlag.getFlag()==0)
        {
            playFlag.setFlag(1);
            view.setVisibility(View.VISIBLE);
        }
    }
}
